package cn.chengpengper.im.platform.common.model.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/*@formatter:off*/

/**
 * ____________________
 * < 神兽护体，永无bug! >
 * --------------------
 *
 * @author huchengpeng
 * @version v1.0.0
 * @date 2024/11/23 15:16
 * @description 群组实体对象
 */

/*@formatter:on*/

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName("im_group")
public class Group extends Model<Group> implements Serializable {
    private static final long serialVersionUID = 8905376509808207164L;

    @TableId(value = "id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    @TableField("name")
    private String name;

    @TableField("owner_id")
    private Long ownerId;

    @TableField("head_image")
    private String headImage;

    @TableField("head_image_thumb")
    private String headImageThumb;

    @TableField("notice")
    private String notice;

    @TableField("deleted")
    private Boolean deleted;

    @TableField("created_time")
    private Date createdTime;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
